package cn.com.api.mapper.base;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import cn.com.api.entity.ApiT_delivery_account_state;

//DAO
public interface T_delivery_account_stateMapperBase {

	// 根据id查看
	@Select("SELECT * FROM t_delivery_account_state  WHERE id = #{id}")
	public ApiT_delivery_account_state findT_delivery_account_stateById(Integer id);

	// 查看数据集
	@Select("SELECT * FROM T_delivery_account_state")
	public List<ApiT_delivery_account_state> findT_delivery_account_states();

	// 添加
	@Insert("INSERT INTO t_delivery_account_state (u_id, curr_status, change_time, to_status, duration) VALUES (#{u_id}, #{curr_status}, #{change_time}, #{to_status}, #{duration})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public int insertT_delivery_account_state(ApiT_delivery_account_state t_delivery_account_state);

	// 修改
	@Update("UPDATE t_delivery_account_state SET u_id = #{u_id}, curr_status = #{curr_status}, change_time = #{change_time}, to_status = #{to_status}, duration = #{duration} WHERE id = #{id}")
	public int updateT_delivery_account_state(ApiT_delivery_account_state t_delivery_account_state);

	// 删除
	@Delete("DELETE FROM t_delivery_account_state  WHERE id = #{id}")
	public int deleteT_delivery_account_state(Integer id);

	// Foreign keys revelant

	// region Indexs revelant

}
